package com.cn.data.thread.countdownlatch;

import java.util.concurrent.CountDownLatch;

/**
 * @Author: chenl
 * @Date: 2019/3/2 23:26
 */
public class CacheHealthChecker extends BaseHealthChecker {

    public CacheHealthChecker(CountDownLatch countDownLatch) {
        super(countDownLatch, "cacheHealthchecker");
    }

    /**
     * 校验服务是否起来
     */
    @Override
    public void verifyService() {

        System.out.println("checking service:        " + getServiceName());

        try {
            Thread.sleep(5000);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        System.out.println(getServiceName() + "   is up");

    }
}
